package org.act.xservices.rt.xcontainer.parser.wsdl;

import java.io.File;

import org.act.xservices.rt.xcontainer.inf.service.wsdl.XcService;

public abstract class AWSDLParser implements IWSDLParser{

    protected static final String XMLSCHEMA_NAMESPACE_URI = "http://www.w3.org/2001/XMLSchema";

    protected static final String XMLSCHEMA_NAMESPACE_PREFIX = "xs";

    protected static final String XML_SCHEMA_LOCAL_NAME = "schema";

    protected static final String XML_SCHEMA_SEQUENCE_LOCAL_NAME = "sequence";

    protected static final String XML_SCHEMA_COMPLEX_TYPE_LOCAL_NAME = "complexType";

    protected static final String XML_SCHEMA_ELEMENT_LOCAL_NAME = "element";

    protected static final String XML_SCHEMA_IMPORT_LOCAL_NAME = "import";

    protected static final String XSD_NAME = "name";

    protected static final String XSD_TARGETNAMESPACE = "targetNamespace";
	
    protected static final String XSD_TYPE = "type";

    protected static final String XSD_REF = "ref";
    
	
	
	
	protected File wsdlFile;
	
	protected XcService xcService;
	
	protected String baseUri;
	

	public AWSDLParser(File wsdlFile){
		this.wsdlFile = wsdlFile;
		this.baseUri = this.wsdlFile.getParentFile().toURI().toString();
	}
	
	
    /**
     * Gets the URI associated with the base document
     * for the WSDL definition.  Note that this URI
     * is for the base document, not the imports.
     * 
     * @return The URI as a String
     */
    public String getBaseUri() {
        return baseUri;
    }

    /**
     * Sets the URI associated with the base document
     * for the WSDL definition.  Note that this URI
     * is for the base document, not the imports.
     * 
     * @param baseUri  The URI as a String
     */
    public void setBaseUri(String baseUri) {
        this.baseUri = baseUri;
    }
}
